package tmp;

// Generated 04-nov-2009 18:40:40 by Hibernate Tools 3.2.4.GA

import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;

/**
 * ServiceGroup generated by hbm2java
 */
@Entity
@Table(name = "service_group", catalog = "fmanzano_gem", uniqueConstraints = {
		@UniqueConstraint(columnNames = "SEG_URL"),
		@UniqueConstraint(columnNames = "SEG_NAME") })
public class ServiceGroup implements java.io.Serializable {

	private Integer segId;
	private String segName;
	private String segUrl;
	private Set<Service> services = new HashSet<Service>(0);

	public ServiceGroup() {
	}

	public ServiceGroup(String segName, String segUrl) {
		this.segName = segName;
		this.segUrl = segUrl;
	}

	public ServiceGroup(String segName, String segUrl, Set<Service> services) {
		this.segName = segName;
		this.segUrl = segUrl;
		this.services = services;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "SEG_ID", unique = true, nullable = false)
	public Integer getSegId() {
		return this.segId;
	}

	public void setSegId(Integer segId) {
		this.segId = segId;
	}

	@Column(name = "SEG_NAME", unique = true, nullable = false)
	public String getSegName() {
		return this.segName;
	}

	public void setSegName(String segName) {
		this.segName = segName;
	}

	@Column(name = "SEG_URL", unique = true, nullable = false)
	public String getSegUrl() {
		return this.segUrl;
	}

	public void setSegUrl(String segUrl) {
		this.segUrl = segUrl;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "serviceGroup")
	public Set<Service> getServices() {
		return this.services;
	}

	public void setServices(Set<Service> services) {
		this.services = services;
	}

}
